<template>
  <AppProvider>
    <template v-if="!appStore.isLock && appStore.reloadAppFlag">
      <router-view v-slot="{ Component }">
        <component :is="Component" />
      </router-view>
    </template>
    <template v-else>
      <LockScreen></LockScreen>
    </template>
  </AppProvider>
</template>

<script setup>
// import { checkIsLockScreen } from '@/api/auth/index.js'
import { defineAsyncComponent } from 'vue'
import { useAppStore } from '@/store/modules/app.js'
import AppProvider from '@/components/app-provider/index.vue'
const LockScreen = defineAsyncComponent(() => import('@/components/lock-screen/index.vue'))
const appStore = useAppStore()
</script>
<style lang="scss">
#app {
  height: 100%;
  .n-config-provider {
    height: inherit;
  }
}
</style>
